<?php
$js_array= array(
	'jquery/validate/jquery.validate.js',
	'jquery/validate/additional-methods.js',
	'profile.js',
);
get_backend_header($js_array);

?>

<h2  class="title">Change Password</h2>

<form id="change_password" name="change_password" class="form">
	<input type="hidden" name="user_id" id="user_id" value="<?php echo $user_id; ?>" />
        <div class="unit">
                <div class="line">
                    <label class="unit bold" for="username" >User No:</label>
                    <div class="unit field">
                        <?php echo $user_no; ?>
                    </div>
                </div>

                <div class ="line">
                    <label class="unit bold" for="old_password">Old Password:</label>
                    <div class="unit field">
                        <input type="password" tabIndex="10" id="old_password" name="old_password" />
                    </div>
                </div>


                <div class ="line">
                    <label class="unit bold" for="new_password">New Password:</label>
                    <div class="unit field">
                            <input type="password" tabIndex="60" id="new_password" name="new_password" />
                    </div>
                </div>

                <div class ="line">
                    <label class="unit bold" for="confirm_password">Confirm Password:</label>
                    <div class="unit field">
                            <input type="password" tabIndex="60" id="confirm_password" name="confirm_password" />
                    </div>
                </div>
        </div>
</form>

<div class ="clear"></div>

<div class="buttons">
        <button id="save" name="save">Save</button>
</div>

<script type="text/javascript">
	$('#old_password').focus();
	
	setupChangePassRules();
		
	$('#save').button({
		icons: {primary: 'ui-icon-disk'}
	}).click(function() {
		$('#change_password').submit();
	});
</script>

<?php get_backend_footer();